// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import App from './App'
import Home from './components/HelloFromVux'

// import { AjaxPlugin } from 'vux'
// Vue.use(AjaxPlugin)
import AlertPlugin from 'vux/src/plugins/alert'
import LoadingPlugin from 'vux/src/plugins/loading'
import ToastPlugin from 'vux/src/plugins/toast'
import ConfirmPlugin from 'vux/src/plugins/confirm'
import axios from 'axios'

// console.log(AjaxPlugin)

Vue.prototype.log = function(text) {
    if (debug) {
        console.log(text);
    }
}
Vue.prototype.$http = axios;

console.log(window.i)
let debug = false
if (debug) {
    Vue.prototype.url = {
        acid: 'http://xmlinkai.iask.in/app/index.php?i=2&c=entry&m=crm',
        root: 'http://xmlinkai.iask.in',
        static: 'http://xmlinkai.iask.in/addons/crm/signin/static/'
    }
} else {
    Vue.prototype.url = {
        acid: '?i=' + window.uniacid + '&c=entry&m=crm',
        root: '../',
        static: '../addons/crm/signin/static/'
    }
}

Vue.use(LoadingPlugin)
Vue.use(AlertPlugin)
Vue.use(ToastPlugin)


FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    // router,
    render: h => h(App)
}).$mount('#app-box')